package com.example.fruitdemo.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.fruitdemo.pojo.OrderDto;
import com.example.fruitdemo.ruslet.R;
import com.example.fruitdemo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("/page")
    public R<Page> getPage(String authorization,int page,int pageSize){
        return orderService.getPage(authorization,page,pageSize);
    }
    @GetMapping("/pagebymsg")
    public R<Page> pageBymsg(String authorization,int page,int pageSize,String searchmsg){

        return orderService.pageBymsg(authorization,page,pageSize,searchmsg);
    }
}
